<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/1/24
 * Time: 14:42
 */
//异步io读取文件
class readfile{
    public function index(){
        $res = swoole_async_readfile(__DIR__."/123.txt",[$this,'file']);
        var_dump($res);
        echo 'status'.PHP_EOL;
    }

    public function file($filename,$content){
        echo $filename.$content;
    }

}

$a =new readfile();
$a->index();


